﻿@model Presentation.Web.Core.Pagination.IPagination<Domain.MainModule.Entities.Dinners>
@{
    ViewBag.Title = "Upcoming Nerd Dinners";
}
<div id='1' data-role="content" class="ui-content" role="main">
    <p>
        <h2>
            Upcoming Dinners</h2>
    </p>
    <ul data-role="listview" data-inset="true" class="ui-listview ui-listview-inset ui-corner-all ui-shadow">
        @foreach (var dinner in Model)
        {        
            <li data-corners="false" data-shadow="false" data-iconshadow="true" data-wrapperels="div"
                data-icon="arrow-r" data-iconpos="right" data-theme="c" class="ui-btn ui-btn-up-c ui-btn-icon-right ui-li-has-arrow ui-li">
                <div class="ui-btn-inner ui-li">
                    <div class="ui-btn-text">
                        <a href="@Url.Action("Details", new { id = dinner.DinnerID })" class="ui-link-inherit">
                            @dinner.Title on <strong>@dinner.EventDate.ToString("yyyy-MMM-dd")
                                @dinner.EventDate.ToString("HH:mm tt")</strong> at
                            @(dinner.Address + " " + dinner.Country)
                        </a>
                    </div>
                    <span class="ui-icon ui-icon-arrow-r ui-icon-shadow">&nbsp;</span></div>
            </li>
        }
        <li data-corners="false" data-shadow="false" data-iconshadow="true" data-wrapperels="div"
            data-icon="arrow-r" data-iconpos="right" data-theme="c" class="ui-btn ui-btn-up-c ui-btn-icon-right ui-li-has-arrow ui-li ui-corner-bottom">
            <div class="ui-btn-inner ui-li">
                <div class="ui-btn-text">
                    @{Html.RenderPartial("_Pagination", Tuple.Create("Index", "Dinners", (Presentation.Web.Core.Pagination.IPagination)Model));}
                    <br/>
                </div>
            </div>
        </li>
    </ul>
</div>
